package com.yuke.cloud.service.uac.service;

import com.yuke.cloud.common.base.dto.LoginAuthDto;
import com.yuke.cloud.common.core.support.IService;
import com.yuke.cloud.service.uac.dto.GroupBindUserDto;
import com.yuke.cloud.service.uac.dto.GroupBindUserReqDto;
import com.yuke.cloud.service.uac.dto.UserGroupDto;
import com.yuke.cloud.service.uac.entity.AccUserGroup;

import java.util.List;


/**
 * Created by wg on 2018/09/15.
 */
public interface AccUserGroupService extends IService<AccUserGroup> {

    int deleteUserGroupByUserId(Long userId);

    UserGroupDto selectUserGroupInfoByUserId(Long userId);

    /**
     * Gets group bind user dto.
     *
     * @param groupId the group id
     * @param userId  the user id
     *
     * @return the group bind user dto
     */
    GroupBindUserDto getGroupBindUserDto(Long groupId, Long userId);

    /**
     * Bind uac user 4 group int.
     *
     * @param groupBindUserReqDto the group bind user req dto
     * @param loginAuthDto        the login auth dto
     */
    void bindUacUser4Group(GroupBindUserReqDto groupBindUserReqDto, LoginAuthDto loginAuthDto);

    List<AccUserGroup> getByUserIdAndGroupId(Long userId, Long groupId);

    Long generateUserGroupId();

    void updateUserGroup(Long userId,  Long groupId);
}
